package com.boot;

import com.service.StudentService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

import java.sql.SQLException;


@SpringBootApplication
@ComponentScan({"com.service","com.config"})
@MapperScan("com.dao")
//@EnableTransactionManagement
//@ImportResource("classpath:spring-transaction.xml")
public class MainBoot  {



    public static void main(String[] args) throws SQLException {

        ApplicationContext applicationContext = SpringApplication.run(MainBoot.class);
        StudentService studentService =  applicationContext.getBean(StudentService.class);


        studentService.add();




    }
}
